<?php
require_once 'credentials.class.php';

class CredentialsTest extends PHPUnit_Framework_TestCase {
  function test_get_basic_search_auth_uses_defaults_if_no_specific_values() {
    $creds = new Credentials("scooby", "doodoo");
    $this->assertEquals( "scooby:doodoo", $creds->get_basic_search_auth() );
  }
  function test_get_extended_search_auth_uses_defaults_if_no_specific_values() {
    $creds = new Credentials("scooby", "doodoo");
    $this->assertEquals( "scooby:doodoo", $creds->get_extended_search_auth() );
  }
  function test_get_harvest_auth_uses_defaults_if_no_specific_values() {
    $creds = new Credentials("scooby", "doodoo");
    $this->assertEquals( "scooby:doodoo", $creds->get_harvest_auth() );
  }
  function test_get_versioned_update_auth_uses_defaults_if_no_specific_values() {
    $creds = new Credentials("scooby", "doodoo");
    $this->assertEquals( "scooby:doodoo", $creds->get_versioned_update_auth() );
  }
  function test_get_full_update_auth_uses_defaults_if_no_specific_values() {
    $creds = new Credentials("scooby", "doodoo");
    $this->assertEquals( "scooby:doodoo", $creds->get_full_update_auth() );
  }
  function test_get_configure_store_auth_uses_defaults_if_no_specific_valuess() {
    $creds = new Credentials("scooby", "doodoo");
    $this->assertEquals( "scooby:doodoo", $creds->get_configure_store_auth() );
  }

  function test_get_basic_search_auth_uses_specific_values_if_supplied() {
    $creds = new Credentials("scooby", "doodoo");
    $creds->set_basic_search_auth('shaggy','eggplant');
    $this->assertEquals( "shaggy:eggplant", $creds->get_basic_search_auth() );
  }
  function test_get_extended_search_auth_uses_specific_values_if_supplied() {
    $creds = new Credentials("scooby", "doodoo");
    $creds->set_extended_search_auth('shaggy','eggplant');
    $this->assertEquals( "shaggy:eggplant", $creds->get_extended_search_auth() );
  }
  function test_get_harvest_auth_uses_specific_values_if_supplied() {
    $creds = new Credentials("scooby", "doodoo");
    $creds->set_harvest_auth('shaggy','eggplant');
    $this->assertEquals( "shaggy:eggplant", $creds->get_harvest_auth() );
  }
  function test_get_versioned_update_auth_uses_specific_values_if_supplied() {
    $creds = new Credentials("scooby", "doodoo");
    $creds->set_versioned_update_auth('shaggy','eggplant');
    $this->assertEquals( "shaggy:eggplant", $creds->get_versioned_update_auth() );
  }
  function test_get_full_update_auth_uses_specific_values_if_supplied() {
    $creds = new Credentials("scooby", "doodoo");
    $creds->set_full_update_auth('shaggy','eggplant');
    $this->assertEquals( "shaggy:eggplant", $creds->get_full_update_auth() );
  }
  function test_get_configure_store_auth_uses_specific_values_if_supplieds() {
    $creds = new Credentials("scooby", "doodoo");
    $creds->set_configure_store_auth('shaggy','eggplant');
    $this->assertEquals( "shaggy:eggplant", $creds->get_configure_store_auth() );
  }


}
?>